﻿namespace LeRenard.ScriptWars.Model.Scripting
{
    /// <summary>
    /// Cycles through an <see cref="IAlgorithm"/> an keeps track of the current and previous <see cref="IOperation"/>s.
    /// </summary>
    public interface IAlgorithmCycler
    {
        /// <summary>
        /// Gets the current line.
        /// </summary>
        int CurrentLine { get; }

        /// <summary>
        /// Gets the current operation.
        /// </summary>
        IOperation CurrentOperation { get; }

        /// <summary>
        /// Goes through the next line of the algorithm.
        /// </summary>
        void Next();

        /// <summary>
        /// Resets the cycler to a specific line number.
        /// </summary>        
        void Reset(int lineNumber);
    }
}
